<?php


use think\facade\Route;

Route::post(":version.login", ':version.Login/doLogin');
Route::get(":version.test", ':version.Demand/test');
//我的整改
Route::get(':version.my_rectification', ':version.Audit/getMyRectification');
Route::group(':version.admin', function () {
    //用户列表
    Route::get('admin_list', ':version.Admin/adminList');
    //用户更新
    Route::get('update_show/:id', ':version.Admin/adminUpdateShow');
    //用户保存
    Route::post('admin_save', ':version.Admin/adminSave');
    //删除用户
    Route::get('admin_delete/:id', ':version.Admin/adminDelete');
    //获取用户信息
    Route::get("admin_show", ':version.Login/adminShow');
    //获取菜单权限
    Route::get('permission', ':version.Menu/menuPermission');
    //菜单列表
    Route::get('menu_list', ':version.Menu/MenuInfo');
    //新增and编辑菜单
    Route::post('save_menu', ':version.Menu/saveMenu');
    //获取菜单类别
    Route::get('menu_type', ':version.Menu/MenuType');
    //根据父级节点获取对应的权限菜单
    Route::post('allot_menu_auth', ':version.Role/allotMenuAuth');
    //删除菜单
    Route::delete('del_menu/:id', ':version.Menu/delMenu');
    //获取角色列表
    Route::get('role_list', ':version.Role/roleList');
    //删除角色
    Route::delete('del_role/:id/:role_id', ':version.Role/delRole');
    //删除角色组
    Route::delete('del_group/:id', ':version.Role/groupDel');
    //更改角色状态
    Route::put('update_role_status/:id/:status', ':version.Role/updateRoleStatus');
    //读取所有角色
    Route::get('role_info_list', ':version.Role/roleInfoList');
    //保存中间表角色
    Route::post('set_role_user_pivot', ':version.Role/setRoleUserPivot');
    //新增and编辑角色
    Route::post('save_role', ':version.Role/saveRole');
    //上传照片
    Route::post('upload_img',':version.CarouselCon/UploadImg');
    //保存幻灯片
    Route::post('save_carousel',':version.CarouselCon/saveCarousel');
    //数据源跑马灯
    Route::get('get_carousel_list', ':version.CarouselCon/getCarouselList');
    //删除跑马灯
    Route::delete('carousel_delete/:id', ':version.CarouselCon/deleteCarousel');
    //保存微信菜单--PC
    Route::post('save_wx_menu',':version.WxMenuCon/saveMenu');
    //菜单数据源
    Route::get('get_wx_menu_list', ':version.WxMenuCon/getWxMenuList');
    //删除
    Route::delete('wx_menu_delete/:id', ':version.WxMenuCon/deleteWxMenu');
    //保存通知
    Route::post('save_notice',':version.System/saveNotice');
    //数据源
    Route::get('get_notice_list', ':version.System/getNoticeList');
    //删除公告
    Route::delete('notice_delete/:id', ':version.System/deleteNotice');

    //项目及指标导入
    Route::post("import_excel", ':version.ProjectCon/importExcel');
    //项目及指标显示
    Route::get('get_project_list', ':version.ProjectCon/getProjectList');
    //保存项目
    Route::post('save_project',':version.ProjectCon/saveProject');
    //删除项目
    Route::delete('project_delete/:id', ':version.ProjectCon/deleteProject');
    //保存项目指标
    Route::post('save_target',':version.ProjectCon/saveProjectTarget');
    //删除项目指标
    Route::delete('target_delete/:id', ':version.ProjectCon/deleteTarget');
    //导入县区，街道，社区，包保单位的excel
    Route::post("import_community_excel", ':version.CommunityCon/importCommunityExcel');
    //社区列表
    Route::get('get_community_list', ':version.CommunityCon/getCommunityList');
    //根据单位ID获取对应的人员信息
    Route::get('get_admin_unit_id', ':version.CommunityCon/getAdminAndCompanyId');

    //导入样本点
    Route::post("import_sample", ':version.Sample/importSampleExcel');

    //样本点列表
    Route::get('get_sample_list', ':version.Sample/getSampleList');
    //保存样本点
    Route::post('save_sample',':version.Sample/saveSample');
    //删除样本点
    Route::delete('sample_delete/:id', ':version.Sample/deleteSample');
    //保存微信权限菜单
    Route::post('save_auth_wx_menu',':version.WxMenuCon/saveAuthWxMenu');
    //获取微信菜单权限
    Route::post('get_auth_wx_menu_list', ':version.WxMenuCon/getAuthWxMenuList');
    //获取项目的id
    Route::post('show_project_ids', ':version.ProjectCon/showProjectIds');
    //关联社区项目
    Route::post('save_community_project',':version.ProjectCon/saveCommunityAndProject');
    //数据列表
    Route::get('get_collect_list', ':version.CollectCon/getCollectList');
    //根据项目id获取指标
    Route::get('get_target_list', ':version.ProjectCon/getProjectTargetList');
    //项目数据源根据指标
    Route::get('get_c_project_list', ':version.ProjectCon/getProjectWxList');
    Route::get('get_project_select_list', ':version.ProjectCon/getProjectSelectList');
    Route::post('get_project_select_s', ':version.ProjectCon/getProjectSelectLists');


    //根据社区id项目id获取对应的样本点
    Route::get('get_sample_info', ':version.Sample/getSampleWxList');
    //根据社区id项目id获取对应的样本点
    Route::post('get_sample_roads', ':version.Sample/getSampleRoads');

    //删除采集信息
    Route::delete('collect_delete/:id', ':version.CollectCon/deleteCollect');
    //获取采集单位数据
    Route::get('get_company_list', ':version.CollectCon/getGatherCompany');
    //获取采集用户数据
    Route::get('get_collect_admin', ':version.CollectCon/getCollectAdmin');

    //采集日志
    Route::get('get_operate_log', ':version.CollectCon/getOperateLog');

    //责任单位
    Route::get('get_unit_list', ':version.Unit/getUnitList');
    //责任单位用户
    Route::get('get_unit_admin', ':version.Unit/getUnitAdmin');
    //验证项目的唯一性
    Route::post('get_check_project', ':version.Unit/getCheckProject');
    //保存社区规则
    Route::post('save_community_gz', ':version.Unit/saveCommunityGz');
    //获取整改规则信息
    Route::post('reform_rules', ':version.Unit/getReformRules');
    //规则列表
    Route::get('get_rectify_info', ':version.Unit/getRectifyAndReformRulesInfo');

    //审核案件
    Route::post('save_zg_case', ':version.Audit/saveZgAuditCase');
    //拒绝案件
    Route::post('refuse_zg_case', ':version.Audit/refuseZgAuditCase');
    //整改案件列表
    Route::get('get_zg_audit_list', ':version.Audit/getZgAuditList');
    //延期审核
    Route::get('get_delay_audit_list', ':version.Audit/getDelayAuditList');
    //退回审核
    Route::get('get_back_audit_list', ':version.Audit/getBackAuditList');
    //获取延期的列表
    Route::post('get_delay_info', ':version.Audit/delayInfo');
    //同意延期案件
    Route::post('agree_delay_case', ':version.Audit/agreeDelayCase');
    //拒绝延期案件
    Route::post('refuse_delay_case', ':version.Audit/refuseDelayCase');
    //审核整改案件
    Route::post('save_zg_audit_case', ':version.Audit/saveZgAuditCollect');
    //拒绝整改案件
    Route::post('refuse_zg_audit_case', ':version.Audit/refuseZgAuditCollect');
    //保存职能属性
    Route::post('attribute_save', ':version.ProjectCon/attributeSave');
    //职能属性列表
    Route::get('attribute_list', ':version.ProjectCon/attributeList');
    //删除职能属性
    Route::delete('attribute_delete/:id', ':version.ProjectCon/deleteAttribute');
    //退回案件重新分配
    Route::post('reassign_save', ':version.CollectCon/reassignSave');
    //退回案件查找
    Route::post('get_back_info', ':version.CollectCon/getBackInfo');
    //拒绝退回案件
    Route::post('refuse_back_case', ':version.CollectCon/refuseBackCase');
    //销案
    Route::post('cancel_the_case', ':version.CollectCon/cancelTheCase');
    //新增and编辑问题中心
    Route::post('save_help', ':version.System/saveHelpCenter');
    //数据源读取   问题中心
    Route::get('get_help_list', ':version.System/getHelpCenterList');
    //删除帮助中心
    Route::delete('help_delete/:id', ':version.System/deleteHelpCenter');

    //新增and编辑制度文件
    Route::post('save_documents', ':version.System/saveDocuments');
    //数据源读取   制度文件
    Route::get('get_documents_list', ':version.System/getDocumentsList');
    //删除制度文件
    Route::delete('documents_delete/:id', ':version.System/deleteDocuments');
    //志愿服务列表
    Route::get('get_voluntary_list', ':version.VoluntaryCon/getPcVoluntaryList');
    //审核志愿服务
    Route::post('audit_voluntary', ':version.VoluntaryCon/auditVoluntary');

    //月报表数据源
    Route::get('get_month_report',':version.VoluntaryCon/getMonthReport');
    //删除月报表数据源
    Route::post('del_month_report', ':version.VoluntaryCon/delMonthReport');
    //月报表详情
    Route::get('report_detail', ':version.VoluntaryCon/reportDetail');
    //审核月报表
    Route::post('audit_month_report', ':version.VoluntaryCon/auditMonthReport');
    //采集统计
    Route::get('get_statistics_info', ':version.CollectCon/getStatisticsInfo');
    //操作日志
    Route::get('get_log_info', ':version.Admin/getLogList');
    //领导调度获取
    Route::get('get_leader_doc', ':version.Demand/getLeaderDocList');
    //详情领导调度
    Route::get('get_leader_detail', ':version.Demand/leaderDetail');
    //审核领导调度
    Route::post('audit_leader', ':version.Demand/auditLeader');
    //删除领导调度
    Route::delete('leader_delete/:id', ':version.Demand/deleteLeader');
    //包保单位调查问卷数据源
    Route::get('examine_list', ':version.Demand/getExamineList');
    //详情包保单位调查问卷
    Route::get('get_examine_detail', ':version.Demand/examineDetail');
    //删除包保单位调查问卷
    Route::delete('pro_delete/:id', ':version.Demand/deleteExamine');
    //审核包保单位调查问卷
    Route::post('audit_examine', ':version.Demand/auditExamine');
    //包保单位特色工作数据源
    Route::get('characteristic_list', ':version.Demand/getCharacteristicList');
    //详情包保单位特色工作
    Route::get('get_characteristic_detail', ':version.Demand/characteristicDetail');
    //删除包保单位特色工作
    Route::delete('characteristic_delete/:id', ':version.Demand/deleteCharacteristic');
    //审核特色工作
    Route::post('audit_characteristic', ':version.Demand/auditCharacteristic');
    //数据源活动登记备案
    Route::get('get_activity_inspect', ':version.Demand/getActivityInspect');
    //删除活动登记备案
    Route::delete('delete_putOnRecord/:id', ':version.Demand/deletePutOnRecord');
    //详情包保单位实地考察新增活动
    Route::get('get_activity_detail', ':version.Demand/activityDetail');
    //审核实地考察
    Route::post('audit_activity', ':version.Demand/auditActivity');
    //删除活动
    Route::delete('delete_activity/:id', ':version.Demand/deleteActivity');
    //临时相册
    Route::get('get_temporary_album', ':version.Demand/getTemporaryAlbum');
    //领导调度保存
    Route::post('save_leader_doc', ':version.Demand/saveLeaderDoc');
    //包保单位调查问卷
    Route::post('save_examine', ':version.Demand/saveExamine');
    //包保单位特色工作
    Route::post('save_characteristic', ':version.Demand/saveCharacteristic');
    //数据源活动登记备案
    Route::get('get_activity_all', ':version.Demand/getActivityAll');
    //包保单位实地考察新增活动
    Route::post('save_activity', ':version.Demand/saveActivity');
    //根据条件获取对应的标签
    Route::get('activity_tag', ':version.Demand/getActivityTag');
    //获取疑难问题
    Route::get('get_difficult_list', ':version.Demand/getDifficultList');
    //详情疑难问题
    Route::get('get_difficult_detail', ':version.Demand/difficultDetail');
    //审核疑难问题
    Route::post('audit_difficult', ':version.Demand/auditDifficult');
    //删除疑难问题
    Route::delete('delete_difficult/:id', ':version.Demand/deleteDifficult');
    //保存疑难问题
    Route::post('save_difficult', ':version.Demand/saveDifficult');
    //工作成效评价统计
    Route::get("upload_count", ':version.Demand/uploadCount');
    //工作成效评价统计
    Route::get("evaluate_count", ':version.Demand/evaluate');
})->middleware(\app\api\middleware\v1\AuthAdmin::class);

//微信端数据 不经过中间件
Route::group(':version.wx',function (){
    //获取token
    Route::post('get_token', ':version.Wechat/getToken');   //小程序获取用户token
    //验证token
    Route::post('token_verify', ':version.Wechat/tokenVerify');
    //微信用户登录
    Route::post('wx_login', ':version.Wechat/wxLogin');
    Route::post('test_login', ':version.Wechat/testLogin');

    //数据源跑马灯
    Route::get('get_carousel_list', ':version.CarouselCon/getCarouselList');
    //菜单数据源--wx
    Route::get('get_wx_menu_info', ':version.WxMenuCon/getWxMenuInfo');
    //所有菜单数据源--wx
    Route::get('get_wx_menu_more', ':version.WxMenuCon/getWxMenuInfoMore');
    //通知数据源
    Route::get('get_notice_list', ':version.System/getNoticeList');
    //采集统计
    Route::get('get_statistics_info', ':version.CollectCon/getStatisticsInfo');

});

//微信端数据 经过中间件的
Route::group(':version.auth_wx',function (){
    //项目数据源
    Route::get('get_project_list', ':version.ProjectCon/getProjectWxList');
    //根据社区id项目id获取对应的样本点
    Route::get('get_sample_info', ':version.Sample/getSampleWxList');
    //提交采集案件
    Route::post('save_gather', ':version.CollectCon/saveGather');
    //我的采集
    Route::get('my_collect', ':version.CollectCon/getMyCollectList');
    //社区样本
    Route::get('get_community_sample', ':version.CommunityCon/getCommunitySample');
    //我的整改
    Route::get('my_rectification', ':version.Audit/getMyRectification');
    //采集详情
    Route::get('collect_detail', ':version.CollectCon/collectDetail');
    //提交采集案件
    Route::post('save_zg_case', ':version.Audit/saveZgCase');
    //采集日志
    Route::get('get_operate_log', ':version.CollectCon/getOperateLog');
    //整改详情
    Route::get('collect_zg_detail', ':version.Audit/checkDetailRec');
    //查找相同单位的人员信息
    Route::get('same_unit', ':version.Admin/getSameUnitList');
    //查找上级单位的人员信息
    Route::get('superior_unit', ':version.Admin/getSuperiorUnit');
    //案件交办
    Route::post('case_assign', ':version.CollectCon/caseAssign');
    //案件延期
    Route::post('case_delay', ':version.CollectCon/caseDelay');
    //删除采集信息
    Route::post('case_delete', ':version.CollectCon/deleteCase');
    //案件退回----暂时废除
    Route::post('case_back', ':version.CollectCon/caseBack');
    //我的案件退回列表
    Route::get('my_case_back', ':version.CollectCon/getMyBackCase');
    //接收案件--退回
    Route::post('agree_case_back', ':version.CollectCon/agreeCaseBack');
    //单位管理员向上级退回案件--退回
    Route::post('back_up_unit', ':version.CollectCon/caseBackUpUnit');
    //单位管理员拒绝退回案件--退回
    Route::post('refuse_case_back', ':version.CollectCon/refuseCaseBack');
    //项目及指标显示
    Route::get('get_wx_project_list', ':version.ProjectCon/getProjectList');
    //根据项目id获取指标
    Route::get('get_target_list', ':version.ProjectCon/getProjectTargetList');
    //单位列表
    Route::get('get_unit_list', ':version.Unit/getWxCompanyList');
    //新增自定义样本点
    Route::post('add_zdy_sample', ':version.Sample/addZdySample');
    //获取当月积分
    Route::get('score_month', ':version.Admin/getScoreCaseMonth');
    //整改统计
    Route::get('reform_count', ':version.Admin/myReformCaseCount');
    //采集统计
    Route::get('gather_count', ':version.Admin/myGatherCaseCount');
    //志愿服务保存
    Route::post('save_voluntary', ':version.VoluntaryCon/saveVoluntary');
    //志愿服务列表
    Route::get('get_voluntary_list', ':version.VoluntaryCon/getVoluntaryList');
    //删除志愿服务
    Route::post('del_voluntary', ':version.VoluntaryCon/delVoluntary');
    //志愿服务详情
    Route::get('get_voluntary_detail', ':version.VoluntaryCon/voluntaryDetail');
    //帮助中心数据源
    Route::get('get_help_list', ':version.System/getHelpCenterList');
    //数据源读取   制度文件
    Route::get('get_documents_list', ':version.System/getDocumentsList');
    //获取当月积分总数
    Route::get('score_count', ':version.Admin/getScoreCaseMonth');
    //获取当月积分明细
    Route::get('get_score_list', ':version.Admin/getScoreCaseMonthList');
    //数据源
    Route::get("get_study_list", ':version.Study/getStudyList');
    //根据id 获取对应的题目
    Route::get('get_topic_list',':version.Study/getTopicList');
    //收藏
    Route::post('collection_topic', ':version.Study/collectionTopic');
    //保存题目
    Route::post('save_topic', ':version.Study/saveTopic');
    //获取题目记录
    Route::get('topic_exercise_log',':version.Study/getTopicExerciseLog');
    //更改用户信息
    Route::post('change_user_info',':version.Admin/changeUserInfo');
    //更改密码
    Route::post('change_password',':version.Admin/changePassword');
    //采集统计
    Route::get('get_statistics_info', ':version.CollectCon/getStatisticsInfo');
    //积分排行
    Route::get('get_rank_list',':version.Admin/getRankList');
    //月报表
    Route::post('save_month_report',':version.VoluntaryCon/saveMonthReport');
    //月报表数据源
    Route::get('get_month_report',':version.VoluntaryCon/getMonthReport');
    //删除月报表数据源
    Route::post('del_month_report', ':version.VoluntaryCon/delMonthReport');
    //月报表详情
    Route::get('report_detail', ':version.VoluntaryCon/reportDetail');
    //包保单位采集统计
    Route::get('gather_unit_statistics', ':version.Statistics/getGatherUnit');
    //日常采集单位统计表
    Route::get('gather_user_statistics', ':version.Statistics/getGatherUser');
    //志愿服务统计表
    Route::get('voluntary_count', ':version.Statistics/getVoluntaryCount');
    //月报表统计
    Route::get('month_report_count', ':version.Statistics/getMonthReportCount');
    //单位整改统计表
    Route::get('zg_count', ':version.Statistics/getZgCount');
    //个人整改统计表
    Route::get('gr_count', ':version.Statistics/getGrCount');
    //创建临时 文件夹
    Route::get('temporary_folder', ':version.Temporary/createTemporaryFolder');
    //保存相册
    Route::post('save_album',':version.Temporary/saveAlbum');
    //获取当天相册的记录
    Route::get('get_album_list', ':version.Temporary/getAlbumList');
    //根据ids获取对应的照片
    Route::get('get_photo_list', ':version.Temporary/getPhotoArrList');
    //根据用户名及文件夹日期获取
    Route::get('photo_all_list', ':version.Temporary/getPhotoAllList');
    //领导调度保存
    Route::post('save_leader_doc', ':version.Demand/saveLeaderDoc');
    //领导调度获取
    Route::get('get_leader_doc', ':version.Demand/getLeaderDocList');
    //删除领导调度
    Route::post('del_leader', ':version.Demand/delLeader');
    //详情领导调度
    Route::get('get_leader_detail', ':version.Demand/leaderDetail');

    //保存活动登记备案
    Route::post('save_put_on', ':version.Demand/savePutOnRecord');
    //数据源活动登记备案
    Route::get('get_activity_inspect', ':version.Demand/getActivityInspect');
    //根据条件获取对应的标签
    Route::get('activity_tag', ':version.Demand/getActivityTag');
    //新增自定义标签
    Route::post('insert_tag', ':version.Demand/insertTag');
    //包保单位实地考察新增活动
    Route::post('save_activity', ':version.Demand/saveActivity');
    //详情包保单位实地考察新增活动
    Route::get('get_activity_detail', ':version.Demand/activityDetail');
    //包保单位实地考察活动数据源
    Route::get('activity_list', ':version.Demand/getInspectActivityList');

    //包保单位调查问卷
    Route::post('save_examine', ':version.Demand/saveExamine');

    //包保单位调查问卷数据源
    Route::get('examine_list', ':version.Demand/getExamineList');

    //包保单位特色工作
    Route::post('save_characteristic', ':version.Demand/saveCharacteristic');

    //包保单位特色工作数据源
    Route::get('characteristic_list', ':version.Demand/getCharacteristicList');
    //详情包保单位调查问卷
    Route::get('get_examine_detail', ':version.Demand/examineDetail');
    //详情包保单位特色工作
    Route::get('get_characteristic_detail', ':version.Demand/characteristicDetail');
    Route::get('check_unit', ':version.Demand/checkUnit');

    //获取疑难问题
    Route::get('get_difficult_list', ':version.Demand/getDifficultList');
    //保存疑难问题
    Route::post('save_difficult', ':version.Demand/saveDifficult');
    //详情疑难问题
    Route::get('get_difficult_detail', ':version.Demand/difficultDetail');


})->middleware(\app\api\middleware\v1\WxAuth::class);